.TH "PQregisterSubClasses" 3 2008-2015 "libpqtypes" "libpqtypes Manual"
.SH NAME
PQregisterSubClasses \- Registers a type aliases or sub-classes.
.SH SYNOPSIS
.LP
\fB#include <libpqtypes.h>
.br
.sp
int PQregisterSubClasses(PGconn *\fIconn\fP, PGregisterType *\fItypes\fP,
.br
                          int \fIcount\fP);
\fP
.SH DEPRECATED
.LP
THIS FUNCTION IS DEPRECATED.  New applications should use PQregisterTypes.
This function is now a wrapper to PQregisterTypes.
.SH DESCRIPTION
.LP
The \fIPQregisterSubClasses\fP() function allows an application
to register an alias or sub-class of another type.

The \fItypes\fP argument is an array containing \fIcount\fP sub class types
to register.  The typname member of the PGregisterType structure must
specify an inheritence relationship: ex. "myint=int4" where myint inherits
from int4.  The \'=\' is called the inheritence operator.  If both typput
and typget members of the PGregisterType structure are NULL, the type at
that element will behave identically to the type it is inheriting
from; an alias.  Otherwise, the base type's put and/or get routines will
be overridden.

NOTE: The typname member of the PGregisterType structure can optionally
contain the type's schema: schema.typname.

WARNING: \fIPQparamCreate\fP is only aware of types that have already been
registered.  If you need to put a type into a param, make sure it is first
registered.

.SH RETURN VALUE
.LP
On success, a non-zero value is returned.  On error, zero is
returned and \fIPQgeterror(3)\fP will contain an error message.
.SH EXAMPLES
.LP
None.
.SH AUTHOR
.LP
A contribution of eSilo, LLC. for the PostgreSQL Database Management System.
Written by Andrew Chernow and Merlin Moncure.
.SH REPORTING BUGS
.LP
Report bugs to <libpqtypes@esilo.com>.
.SH COPYRIGHT
.LP
Copyright (c) 2008-2015 eSilo, LLC. All rights reserved.
.br
This is free software; see the source for copying conditions.
There is NO warranty; not even for MERCHANTABILITY or  FITNESS
FOR A PARTICULAR PURPOSE.
.SH SEE ALSO
.LP
\fIpqt-handlers(3)\fP, \fIPQputf(3)\fP, \fIPQgetf(3)\fP

